package self.niu.com.resume.db;

import self.niu.com.resume.db.dao.JavaAbilityDao;
import self.niu.com.resume.db.dao.KnowAbilityDao;
import self.niu.com.resume.db.dao.ProjectsDao;
import self.niu.com.resume.db.dao.SeniorAbilityDao;
import self.niu.com.resume.db.dao.SkilledAbilityDao;
import self.niu.com.resume.db.dao.ToolAbilityDao;
import self.niu.com.resume.db.dao.UserDao;
import self.niu.com.resume.db.dao.impl.JavaAblilityDaoImpl;
import self.niu.com.resume.db.dao.impl.KonwAbilityDaoImpl;
import self.niu.com.resume.db.dao.impl.ProjectDaoImpl;
import self.niu.com.resume.db.dao.impl.SeinorAbilityDaoImpl;
import self.niu.com.resume.db.dao.impl.SkilledAbilityDaoImpl;
import self.niu.com.resume.db.dao.impl.ToolAbilityDaoImpl;
import self.niu.com.resume.db.dao.impl.UserDaoImpl;

/**
 * Created by Administrator on 2015/9/26.
 */
public class DaoFactory {
    public static UserDao userDao;
    public static JavaAbilityDao javaAbilityDao;
    public static KnowAbilityDao knowAbilityDao;
    private static SkilledAbilityDao skilledAbilityDao;
    private static SeniorAbilityDao seniorAbilityDao;
    private static ToolAbilityDao toolAbilityDao;
    private static ProjectsDao ProjectsDao;


    public static ToolAbilityDao getToolAbilityDao() {
        if (toolAbilityDao == null) {
            toolAbilityDao = new ToolAbilityDaoImpl();
        }
        return toolAbilityDao;
    }

    public static SeniorAbilityDao getSeniorAbilityDao() {
        if (seniorAbilityDao == null) {
            seniorAbilityDao = new SeinorAbilityDaoImpl();
        }
        return seniorAbilityDao;
    }

    public static SkilledAbilityDao getSkilledAbilityDao() {
        if (skilledAbilityDao == null) {
            skilledAbilityDao = new SkilledAbilityDaoImpl();
        }
        return skilledAbilityDao;
    }

    public static KnowAbilityDao getKnowAbilityDao() {
        if (knowAbilityDao == null) {
            knowAbilityDao = new KonwAbilityDaoImpl();
        }
        return knowAbilityDao;
    }

    public static UserDao getUserDao() {
        if (userDao == null) {
            userDao = new UserDaoImpl();
        }
        return userDao;
    }

    public static JavaAbilityDao getJavaAbilityDao() {
        if (javaAbilityDao == null) {
            javaAbilityDao = new JavaAblilityDaoImpl();
        }
        return javaAbilityDao;
    }

    public static ProjectsDao getProjectsDao() {
        if (ProjectsDao == null) {
            ProjectsDao = new ProjectDaoImpl();
        }
        return ProjectsDao;
    }
}
